<template>
  <a-config-provider :locale="locale()">
    <div id="app">
      <router-view></router-view>
      <ModalLogin />
    </div>
  </a-config-provider>
</template>

<script>
import zhCN from 'ant-design-vue/lib/locale/zh_CN'
import enUS from 'ant-design-vue/lib/locale/en_US'

export default {
  name: 'app',
  data () {
    return {
      
    }
  },
  methods: {
    locale() { // 设置ant design vue 框架的语言（日期选择框，分页...）
      let locale = this.$i18n.locale
      if(locale == 'zh_CN'){
        return zhCN
      } else if(locale == 'en_US'){
        return enUS
      } else {
        console.log('unknown locale!')
      }
    }
  }
}
</script>

<style>
#app {
  font-family: '思源黑体', sans-serif;
}
</style>
